RFC 9651: Structured Field Values for HTTP - #693
Conversation
59a96a3 to
1f35bb5
Compare
1f35bb5 to
e76aafc
Compare
e76aafc to
e0ae22c
Compare
e0ae22c to
803c213
Compare
803c213 to
52ed32a
Compare
4f923f0 to
1bdbd48
Compare
|
@arturobernalg Very good. Out of curiosity, how much of this change-set was AI generated? It is perfectly fine. It just looks completely different and that makes me think those classes got generated. Ideally I would like the |
1bdbd48 to
f4225db
Compare
@ok2c done. AI assisted always under my revisions. |
@arturobernalg Very interesting. Did you train it to use our parsing APIs or was that part hand-written? |
ok2c
left a comment
There was a problem hiding this comment.
@arturobernalg #hashCode now look good. Almost there.
| */ | ||
| public static StructuredFieldBareItem ofDecimal(final BigDecimal value) { | ||
| Args.notNull(value, "Decimal value"); | ||
| if (value.abs().compareTo(DECIMAL_ROUNDING_LIMIT) >= 0) { |
| } | ||
| return this.type == StructuredFieldType.BYTE_SEQUENCE | ||
| ? Arrays.equals((byte[]) this.value, (byte[]) that.value) | ||
| : LangUtils.equals(this.value, that.value); |
There was a problem hiding this comment.
@arturobernalg Wait. No need to use deprecated methods.
f4225db to
1349fbe
Compare
@ok2c trained by me. |
Adds Structured Field Values (RFC 9651) support under
org.apache.hc.core5.http.structured: a strict single-pass parser, a canonicalserializer, and an immutable value model covering Items, Lists, Dictionaries, parameters and inner lists, and all eight bare-item types (Integer, Decimal, String, Token, Byte Sequence, Boolean, Date, Display String).StructuredFieldHeadersintegrates it with message headers. Values are validated and normalized on construction, so serialization is total and round-trips are canonical.